import requests

class TinyShop:
    def login_1(self,user,pwd,auto):
        self.host = "http://192.168.4.108"
        param = {"email":user,"password":pwd,"autologin":auto}
        url = self.host+"/TinyShop/index.php?con=simple&act=login_act"
        r = requests.post(url=url,data=param)
        return r.text
    def login_a(self,user,pwd,code):
        param = {"name":user,"password":pwd,"verifycode":code}
        url = self.host+"/TinyShop/index.php?con=admin&act=check"
        r = requests.post(url=url,data=param)
        return r.text
if __name__ == "__main__":
    t = TinyShop()
    # t.login_1("1446637478@qq.com","245248776","1")
    t.login_a("admin","123456","aaaa")